﻿#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <math.h>
int is_armstrong(int num) 
{
    int tmp = num, count = 0, sum = 0,k=num;
    while (tmp > 0)
    {
        count++;
        tmp /= 10;
    }
    while (k > 0)
    {
        sum+= (int)pow(k%10, count);
        k /= 10;
    }
    return sum == num;
}

int main() 
{
    for (int i = 0; i <= 100000; i++) 
    {
        if (is_armstrong(i)) 
        {
            printf("%d ", i);
        }
    }
    return 0;
}

